package store.lunangangster.engine.impl.entity;

import java.util.HashMap;
import java.util.Map;

public class ProcessDefinitionEntityImpl extends EntityImpl implements ProcessDefinitionEntity {

  // DB property
  protected String key;
  protected String deploymentId;
  protected int version;
  protected String name;
  protected String documentation;
  protected String resourceName;

  @Override
  public String getKey() {
    return key;
  }

  @Override
  public void setKey(String key) {
    this.key = key;
  }

  @Override
  public String getDeploymentId() {
    return deploymentId;
  }

  @Override
  public int getVersion() {
    return version;
  }

  @Override
  public void setVersion(int version) {
    this.version = version;
  }

  @Override
  public void setDeploymentId(String deployId) {
    this.deploymentId = deployId;
  }

  @Override
  public String getName() {
    return name;
  }

  @Override
  public void setName(String name) {
    this.name = name;
  }

  @Override
  public String getDocumentation() {
    return documentation;
  }

  @Override
  public void setDocumentation(String documentation) {
    this.documentation = documentation;
  }

  @Override
  public String getResourceName() {
    return resourceName;
  }

  @Override
  public void setResourceName(String resourceName) {
    this.resourceName = resourceName;
  }

  @Override
  public Object getPersistState() {
    Map<String, Object> persistState = new HashMap<>();

    persistState.put("key", key);
    persistState.put("deploymentId", deploymentId);
    persistState.put("version", version);
    persistState.put("name", name);
    persistState.put("documentation", documentation);
    persistState.put("resourceName", resourceName);

    return persistState;
  }
}
